<?php

    //设置文档类型
	//header('Content-Type: text/html');
	//header('Content-Type: text/plain');
    header('Content-Type: application/vnd.ms-excel');
?>

<table border="1px" cellpadding="20px">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>年龄</th>
    </tr>
    
    <tr>
        <td>1</td>
        <td>张三</td>
        <td>男</td>
    </tr>
    
    <tr>
        <td>2</td>
        <td>李四</td>
        <td>女</td>
    </tr>
</table>